#ifndef _Goomba_h_
#define _Goomba_h_
#include<windows.h>
#include "Sprite.h"
#include"StaticObjects.h"
#include"Camara.h"
#include"DAudio.h"
class CGoomba
{
	int id;
	float x;
	float y;
	int yjump;
	float xprev;
	float yprev;
	int width;
	int height;
	float vx;
	float vy;
	bool isfalling;
	bool touchx;
	bool istop;
	CSprite *Goomba;
	CSprite *PushedGoomba;
	CSprite *JumpGoomba;
	CSound *BePushed_Sound;
	CSound *BeJumped_Sound;
	DWORD last_time;
public:

	CGoomba(float x,float y,int width,int height);
	~CGoomba();
	bool bePushed;
	bool beJump;
	bool isover;
	bool touch_left;
	bool befired;
	bool moveleft;
	bool ispause;
	RECT getRECT();
	void BePushed();
	void BeJump();
	void Move(CStaticObjects *StaticObjects,RECT screen);
	void Render(LPD3DXSPRITE sprite,LPDIRECT3DTEXTURE9 image,int time,int xcamara);
	int CollisionWithMario(bool is_star_man,RECT marioRect,int direction);
	void CollisionWithKoopa(RECT koopaRect);
};
#endif
